const int N = 30;
int f[N];
class Solution
{
public:
    int jumpFloorII(int number)
    {
        f[1] = 1;
        f[2] = 2;
        for (int i = 3; i <= number; ++i)
        {
            f[i] = f[i - 1] + f[i - 2] * 2;
        }
        return f[number];
    }
};